package com.tianyu.inspection.common.model;

import java.util.Arrays;
import java.util.List;

/**********************************
 * @Author YSW
 * @Description
 * @Date 2021/1/11 - 18:20
 **********************************/

public class ListModel {

    public static String getLineKeys(List<String> list){
        StringBuffer sb = new StringBuffer();
        list.forEach((s -> {
            String humpToLine = MapModel.humpToLine(s);
            sb.append(humpToLine).append(",");
        }));
        sb.deleteCharAt(sb.length()-1);
        return sb.toString();
    }

    public static String getLineKeys(String params){
        StringBuffer sb = new StringBuffer();
        Arrays.asList(params.split(",")).forEach((s -> {
            String humpToLine = MapModel.humpToLine(s);
            sb.append(humpToLine).append(",");
        }));
        sb.deleteCharAt(sb.length()-1);
        return sb.toString();
    }
}
